<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./js/react.development.js"></script>
    <script src="./js/react-dom.development.js"></script>
    <script src="./js/babel.min.js"></script>
  </head>
  <body>
    <div id="app"></div>
    <!-- 创建元素并挂载  react+jsxml-->
   
    <script type="text/babel">
      // 1、创建元素
      let el = (<button title="提示信息" className="danger">
        按钮提示文字</button>);
      console.log(el);
      // 2、查找父元素容器
      let app=document.querySelector('#app')
      console.log(app);
      let root=ReactDOM.createRoot(app)
      console.log(root);
      // 渲染
      root.render(el)
    </script>
  </body>
</html>
